// package: rewords-server-2024
// filename: word
// author: diogoxiang@gmail.com
// time: 2024/11/27 16:28

package wordAPI

import (
	"rewords-server-2024/internal/model/entity"
	"rewords-server-2024/internal/model/input/query_in"

	"github.com/gogf/gf/v2/frame/g"
)

type WordsListReq struct {
	g.Meta         `path:"/words/list" method:"post" summary:"获取词库列表" tags:"词库"`
	Conditions     []query_in.Condition  `json:"conditions,omitempty" summary:"查找条件"`   // 查找字段
	OrderFields    []query_in.OrderField `json:"order_fields,omitempty" summary:"排序字段"` // 排序字段
	*query_in.Page `json:"page"`         // 分页
}

type WordsListRes struct {
	Data                []entity.WordDict `json:"list"` // 单词列表
	query_in.PageResult                   // 分页结果
}

type WordOneReq struct {
	g.Meta `path:"/words/one" method:"get" summary:"获取单词详情" tags:"词库"`
	Q      string `json:"q" v:"required#查询单词不能为空" dc:"查询内容"` // 查询单词
}

type WordOneRes struct {
	entity.WordDict // 单词信息
}
